<?php session_start();?>

<?php if(isset($_SESSION['user'])){ ?> 
<html>
<head>
<title>Employee Information</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style1 {
	font-family: Cambria;
	color: #000080;
}
.style2 {color: #000099}
-->
</style>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (Untitled-1) -->
<table width="620" height="650" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
	<tr>
		<td><table width="620" height="204" border="0" background="images/report_01.png">
          <tr height="10%">
            <td><div align="center">
              <h1 class="style1">NAWODAYA INSTITUTE (PVT) LTD </h1>
            </div></td>
          </tr>
          <tr height="10%">
            <td bgcolor="#FFFFFF"> <div align="center" class="style2">No: 66/12, <br>
Yatiyanthota road,<br>
Awissawella. .
            </div></td>
          </tr>
          <tr>
            <td><div align="center" class="style2">Tel : 036-2230454/Fax : 94-3-2687014<br>
            Email : avinavodaya@gmail.com</div></td>
          </tr>
		  
		  <tr>
		    <td>&nbsp;</td>
		  </tr>
          <tr>
            <td height="3" background="images/report_04.png" style="background-repeat:no-repeat">&nbsp;</td>
          </tr>
        </table></td>
	</tr>
	<?php
	include'../logic/Classes/employeeHandler.php';
	include'../logic/Classes/db.php';
	$empno=$_GET['empno'];
	
	$x=new DbConnect();
    $con=$x->getConnection();

	
	$rep=new EmployeeHandler();
	$rep->setCon($con);
	
	$result=$rep->getReport($empno);
	
	$time_now=mktime(date('H')+5,date('i')+30,date('s'),date('m'),date('d'),date('Y'));
	
	mysql_close($con);
	
	
	
	
	 ?>
	<tr>
		<td><table width="620" height="600" border="0" background="images/report_02.png">
          <tr>
            <td height="20%" colspan="5"><h3 align="center">EMPLOYEE INFORMATION </h3>
            <br/>
              <table width="100%" border="0">
			  <?php while($row=mysql_fetch_array($result)) { ?>
                <tr>
                  <td width="27%"><strong>Registration No </strong></td>
                  <td width="3%"><strong>:</strong></td>
                  <td width="70%"><?php echo $row['emp_no'];?></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td><strong>Initials</strong></td>
                  <td><strong>:</strong></td>
                  <td><?php echo $row['initials'];?></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td><strong>First Name </strong></td>
                  <td><strong>:</strong></td>
                  <td><?php echo $row['f_name'];?></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td><strong>Last Name </strong></td>
                  <td><strong>:</strong></td>
                  <td><?php echo $row['l_name'];?></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td><strong>Gender</strong></td>
                  <td><strong>:</strong></td>
                  <td><?php echo $row['gender'];?></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td><strong>Birthday</strong></td>
                  <td><strong>:</strong></td>
                  <td><?php echo $row['b_date'];?></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td><strong>NIC</strong></td>
                  <td><strong>:</strong></td>
                  <td><?php echo $row['nic'];?></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td><strong>Address</strong></td>
                  <td><strong>:</strong></td>
                  <td><?php echo $row['address'];?></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td><strong>Contact No </strong></td>
                  <td><strong>:</strong></td>
                  <td><?php echo $row['tel_no'];?></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td><strong>Email</strong></td>
                  <td><strong>:</strong></td>
                  <td><?php echo $row['email'];?></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td><strong>Joined Date </strong></td>
                  <td><strong>:</strong></td>
                  <td><?php echo $row['j_date'];?></td>
                </tr>
				
              </table></td>
          </tr>
          <tr>
            <td height="20%" colspan="5">&nbsp;</td>
          </tr>
          <tr>
            <td height="20%" colspan="5"></td>
          </tr>
          <tr>
            <td height="20%" colspan="2"><strong>Qualification</strong></td>
            <td width="15" height="20%"><strong>:</strong></td>
            <td colspan="2"><?php echo $row['qualifications'];?></td>
          </tr>
          <tr>
            <td height="20%" colspan="5">&nbsp;</td>
          </tr>
          <tr>
            <td width="121" height="20%"><strong>Experiences</strong></td>
            <td width="38">&nbsp;</td>
            <td height="20%"><strong>:</strong></td>
            <td height="20%"><?php echo $row['exp'];?></td>
            <td height="20%">&nbsp;</td>
          </tr>
		  <?php } ?>
          <tr>
            <td height="20%" colspan="5">&nbsp;</td>
          </tr>
          <tr>
            <td height="20%" colspan="5"><table width="584" border="0" cellspacing="0" cellpadding="0">
              <tr>
               <td width="106" background="images/Untitled-1.jpg">&nbsp;&nbsp;<?php echo $_SESSION['user']; ?></td>
			    <td width="363" >&nbsp;</td>
                <td width="115" background="images/Untitled-1.jpg">&nbsp;&nbsp;&nbsp;<?php echo date('Y-m-d',$time_now);  ?></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="20%" colspan="2"><strong>&nbsp;&nbsp;Issued By </strong></td>
            <td>&nbsp;</td>
            <td width="297">&nbsp;</td>
            <td width="127"><strong>Issued</strong> <strong>Date</strong></td>
          </tr>
          <tr>
            <td height="20%" colspan="5">&nbsp;</td>
          </tr>
          
          
         
        </table></td>
	</tr>
	<tr>
		<td><table width="620" height="42" border="0" background="images/report_03.png">
          <tr>
            <td><div align="left" class="style2">
              <div align="center">Generated By NAWODAYA MIS</div>
            </div></td>
          </tr>
        </table></td>
	</tr>
</table>
<!-- End ImageReady Slices -->
</body>
</html>
<?php  } else { header("location:../../index.php");   }?>